#ifndef _LINUX_ERRNO_H
#define _LINUX_ERRNO_H

#include <uapi/linux/errno.h>

#ifdef __KERNEL__

#define OK              0

#define EKERNEL_BASE	512
/**
 * 这些错误仅内核可见
 */
#define ERESTARTSYS	(EKERNEL_BASE + 1)
/**
 * 不是正确的IOCTRL命令
 */
#define ENOIOCTLCMD	 (EKERNEL_BASE + 2)
/**
 * 驱动请求稍后再试
 */
#define EPROBE_DEFER	(EKERNEL_BASE + 3)
/**
 * IO请求已经入队，完成后会发出通知
 */
#define EIOCBQUEUED		(EKERNEL_BASE + 4)


#define ERESTARTNOINTR	513
#define ERESTARTNOHAND	514	/* restart if no handler.. */
#define ERESTART_RESTARTBLOCK 517 /* restart by calling sys_restart_syscall */

/* Defined for the NFSv3 protocol */
#define EBADHANDLE	521	/* Illegal NFS file handle */
#define ENOTSYNC	522	/* Update synchronization mismatch */
#define EBADCOOKIE	523	/* Cookie is stale */
#define ENOTSUPP	524	/* Operation is not supported */
#define ETOOSMALL	525	/* Buffer or request is too small */
#define ESERVERFAULT	526	/* An untranslatable error occurred */
#define EBADTYPE	527	/* Type not supported by server */
#define EJUKEBOX	528	/* Request initiated, but will not complete before timeout */
#define EIOCBRETRY	530	/* iocb queued, will trigger a retry */

#endif
#endif
